home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4609 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  902 b 

  1. Path: svnews.ubinet.ubs.com!ubszh!ubszh!jis
  2. From: jis@ubszh.net.ch (Johnston Ian (by ubsswop))
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Why Do I Use An Ampersand in Member Class Parameters?
  5. Date: 31 Jan 1996 08:47:16 GMT
  6. Organization: UBS
  7. Distribution: world
  8. Message-ID: <4enaak$o1h@ubszh.fh.zh.ubs.com>
  9. References: <4emnv2$n5o@alcor.usc.edu>
  10. NNTP-Posting-Host: nol2179.fh.zh.ubs.com
  11.  
  12. In article <4emnv2$n5o@alcor.usc.edu>, wawda@alcor.usc.edu (Abu Wawda) writes:
  13. |> class Simple
  14. |> {
  15. |> public:
  16. |>   Simple();
  17. |>   int operator += (const Simple &);
  18. |> private:
  19. |>   int data;
  20. |> };
  21. |> 
  22. |> I have seen many examples of this but I what I don't understand is why
  23. |> there is an amersand after Simple? I would wind up implementating the
  24. |> function as something like the following:
  25.  
  26. My suggestion is you obtain a C++ text book -- any C++ text book -- and
  27. read it.
  28.  
  29. You might as well ask what is "int".
  30.  
  31. Ian
  32.